﻿//funkcja do centrowania elementów
jQuery.fn.center = function () {
    this.css("position", "absolute");
    this.css("top", ($(window).height() - this.height()) / 2 + $(window).scrollTop() + "px");
    this.css("left", ($(window).width() - this.width()) / 2 + $(window).scrollLeft() + "px");
    return this;
}
jQuery(document).ready(function ($) {
	ShowPageMessage();
});

function ShowAjaxLoader() {
    var loader = $("#ajaxloader");
    loader.center();
    loader.show();
}
function HideAjaxLoader() {
    $("#ajaxloader").hide();
}
function ShowPageMessage() {
	$("#page-message").delay(500).show('slow', callback);

	function callback() {
		$("#page-message").delay(5000).hide('slow');
	};
}
